package com.ok.api.client;

import com.ok.api.client.fallback.IntegralFallback;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @ClassName IntegralClient
 * @Description TODO
 * @Author hw
 * @Date 2024/5/8 17:02
 */
@FeignClient(value = "ok-integral", fallbackFactory = IntegralFallback.class)
public interface IntegralClient {

    /*
    添加用户对应积分
     */
    @PostMapping("/integral/add")
    public void  add(@RequestParam("userId") Long userId);

    /*
    修改用户对应积分
     */
    @PutMapping("/integral/update")
    public void update(@RequestParam("integral") Double integral);
}
